package persistencia;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Session;

public interface GenericDAO<T, ID extends Serializable> {

	void save(T entity) throws DAOException;

	T findByID(ID id, boolean lock) throws DAOException;

	List<T> findByExample(T exampleInstance, String... excludeProperty) throws DAOException;

	List<T> findAll() throws DAOException;

	void flush() throws DAOException;

	void clear() throws DAOException;
	
	void delete(T entity) throws DAOException; 

	Session getSession();

}
